﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGsPropertiesDirectRenderOutput : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGsPropertiesDirectRenderOutput(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGsPropertiesDirectRenderOutput obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGsPropertiesDirectRenderOutput()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGsPropertiesDirectRenderOutput(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public virtual void directRenderOutputPoint(OdGePoint3d arg0, OdCmEntityColor arg1)
		{
			GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_directRenderOutputPoint(this.swigCPtr, OdGePoint3d.getCPtr(arg0), OdCmEntityColor.getCPtr(arg1));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void directRenderOutputLineFlat(OdGePoint3d arg0, OdGePoint3d arg1, OdCmEntityColor arg2)
		{
			GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_directRenderOutputLineFlat(this.swigCPtr, OdGePoint3d.getCPtr(arg0), OdGePoint3d.getCPtr(arg1), OdCmEntityColor.getCPtr(arg2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void directRenderOutputLineGouraud(OdGePoint3d arg0, OdGePoint3d arg1, OdCmEntityColor arg2, OdCmEntityColor arg3)
		{
			GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_directRenderOutputLineGouraud(this.swigCPtr, OdGePoint3d.getCPtr(arg0), OdGePoint3d.getCPtr(arg1), OdCmEntityColor.getCPtr(arg2), OdCmEntityColor.getCPtr(arg3));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void directRenderOutputTriangleFlat(OdGePoint3d arg0, OdGePoint3d arg1, OdGePoint3d arg2, OdCmEntityColor arg3)
		{
			GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_directRenderOutputTriangleFlat(this.swigCPtr, OdGePoint3d.getCPtr(arg0), OdGePoint3d.getCPtr(arg1), OdGePoint3d.getCPtr(arg2), OdCmEntityColor.getCPtr(arg3));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void directRenderOutputTriangleGouraud(OdGePoint3d arg0, OdGePoint3d arg1, OdGePoint3d arg2, OdCmEntityColor arg3, OdCmEntityColor arg4, OdCmEntityColor arg5)
		{
			GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_directRenderOutputTriangleGouraud(this.swigCPtr, OdGePoint3d.getCPtr(arg0), OdGePoint3d.getCPtr(arg1), OdGePoint3d.getCPtr(arg2), OdCmEntityColor.getCPtr(arg3), OdCmEntityColor.getCPtr(arg4), OdCmEntityColor.getCPtr(arg5));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void directRenderOutputPolygoneFlat(uint arg0, OdGePoint3d arg1, OdCmEntityColor arg2)
		{
			GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_directRenderOutputPolygoneFlat(this.swigCPtr, arg0, OdGePoint3d.getCPtr(arg1), OdCmEntityColor.getCPtr(arg2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void directRenderOutputPolygoneGouraud(uint arg0, OdGePoint3d arg1, OdCmEntityColor arg2)
		{
			GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_directRenderOutputPolygoneGouraud(this.swigCPtr, arg0, OdGePoint3d.getCPtr(arg1), OdCmEntityColor.getCPtr(arg2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void directRenderOutputImage(OdGePoint3d arg0, OdGiRasterImage arg1, OdGsPropertiesDirectRenderOutput.DirectRenderImageParams arg2)
		{
			GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_directRenderOutputImage(this.swigCPtr, OdGePoint3d.getCPtr(arg0), OdGiRasterImage.getCPtr(arg1), OdGsPropertiesDirectRenderOutput.DirectRenderImageParams.getCPtr(arg2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual uint directRenderOutputFlags()
		{
			uint result = GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_directRenderOutputFlags(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;

		public class DirectRenderImageUV : IDisposable
		{
			[EditorBrowsable(EditorBrowsableState.Never)]
			public DirectRenderImageUV(IntPtr cPtr, bool cMemoryOwn)
			{
				this.swigCMemOwn = cMemoryOwn;
				this.swigCPtr = new HandleRef(this, cPtr);
			}

			[EditorBrowsable(EditorBrowsableState.Never)]
			public static HandleRef getCPtr(OdGsPropertiesDirectRenderOutput.DirectRenderImageUV obj)
			{
				if (obj != null)
				{
					return obj.swigCPtr;
				}
				return new HandleRef(null, IntPtr.Zero);
			}

			~DirectRenderImageUV()
			{
				this.Dispose();
			}

			public virtual void Dispose()
			{
				if (this.swigCPtr.Handle != IntPtr.Zero)
				{
					if (this.swigCMemOwn)
					{
						lock (this.locker)
						{
							if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
							{
								this.swigCMemOwn = false;
								GlobalsPINVOKE.delete_OdGsPropertiesDirectRenderOutput_DirectRenderImageUV(this.swigCPtr);
							}
						}
						this.swigCMemOwn = false;
					}
					this.swigCPtr = new HandleRef(null, IntPtr.Zero);
				}
				GC.SuppressFinalize(this);
			}

			public double u
			{
				get
				{
					double result = GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_DirectRenderImageUV_u_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_DirectRenderImageUV_u_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public double v
			{
				get
				{
					double result = GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_DirectRenderImageUV_v_get(this.swigCPtr);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_DirectRenderImageUV_v_set(this.swigCPtr, value);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public DirectRenderImageUV() : this(GlobalsPINVOKE.new_OdGsPropertiesDirectRenderOutput_DirectRenderImageUV(), true)
			{
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}

			private object locker = new object();

			private HandleRef swigCPtr;

			protected bool swigCMemOwn;
		}

		public class DirectRenderImageParams : IDisposable
		{
			[EditorBrowsable(EditorBrowsableState.Never)]
			public DirectRenderImageParams(IntPtr cPtr, bool cMemoryOwn)
			{
				this.swigCMemOwn = cMemoryOwn;
				this.swigCPtr = new HandleRef(this, cPtr);
			}

			[EditorBrowsable(EditorBrowsableState.Never)]
			public static HandleRef getCPtr(OdGsPropertiesDirectRenderOutput.DirectRenderImageParams obj)
			{
				if (obj != null)
				{
					return obj.swigCPtr;
				}
				return new HandleRef(null, IntPtr.Zero);
			}

			~DirectRenderImageParams()
			{
				this.Dispose();
			}

			public virtual void Dispose()
			{
				if (this.swigCPtr.Handle != IntPtr.Zero)
				{
					if (this.swigCMemOwn)
					{
						lock (this.locker)
						{
							if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
							{
								this.swigCMemOwn = false;
								GlobalsPINVOKE.delete_OdGsPropertiesDirectRenderOutput_DirectRenderImageParams(this.swigCPtr);
							}
						}
						this.swigCMemOwn = false;
					}
					this.swigCPtr = new HandleRef(null, IntPtr.Zero);
				}
				GC.SuppressFinalize(this);
			}

			public OdGsPropertiesDirectRenderOutput.DirectRenderImageUV uvCoords
			{
				get
				{
					IntPtr intPtr = GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_DirectRenderImageParams_uvCoords_get(this.swigCPtr);
					OdGsPropertiesDirectRenderOutput.DirectRenderImageUV result = (intPtr == IntPtr.Zero) ? null : new OdGsPropertiesDirectRenderOutput.DirectRenderImageUV(intPtr, false);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_DirectRenderImageParams_uvCoords_set(this.swigCPtr, OdGsPropertiesDirectRenderOutput.DirectRenderImageUV.getCPtr(value));
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public OdGiDrawable pDrawable
			{
				get
				{
					IntPtr intPtr = GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_DirectRenderImageParams_pDrawable_get(this.swigCPtr);
					OdGiDrawable result = (intPtr == IntPtr.Zero) ? null : new OdGiDrawable(intPtr, false);
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
					return result;
				}
				set
				{
					GlobalsPINVOKE.OdGsPropertiesDirectRenderOutput_DirectRenderImageParams_pDrawable_set(this.swigCPtr, OdGiDrawable.getCPtr(value));
					if (GlobalsPINVOKE.SWIGPendingException.Pending)
					{
						throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
					}
				}
			}

			public DirectRenderImageParams() : this(GlobalsPINVOKE.new_OdGsPropertiesDirectRenderOutput_DirectRenderImageParams(), true)
			{
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}

			private object locker = new object();

			private HandleRef swigCPtr;

			protected bool swigCMemOwn;
		}

		public enum DirectRenderFlags
		{
			DirectRender_Point = 1,
			DirectRender_LineFlat,
			DirectRender_LineGouraud = 4,
			DirectRender_TriangleFlat = 8,
			DirectRender_TriangleGouraud = 16,
			DirectRender_PolygoneFlat = 32,
			DirectRender_PolygoneGouraud = 64,
			DirectRender_Image = 128
		}
	}
}
